.wrapper {
  width: 100%;
  height: 100vmax;
  background-color: #171f27;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-flow: column wrap;
  --target-border-color: rgb(92, 102, 112);
  --box-border-color: hsl(210deg 7.09% 50.2%);
  --box-bg-color: hsl(210deg, 15%, 20%);
}

#controllerTitle {
  text-align: center;
  color: #FFF;
  margin: 12px;
  font-size: 15px;
  font-weight: bold;
}

#controller {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

#btn {
  font-size: 12Px;
  color: #aeb0b3;
  text-align: center;
  padding: 6px 6px;
  margin: 0 4px;
  border-bottom: 2px solid #aeb0b3;
  transition: 0.4s;

  &.active {
    color: #FFF;
    border-bottom: 2px solid #f2d662;
  }
}

.container {
  width: 100%;
  padding: 16px;
  margin-bottom: 16px;
  perspective: 1000px;
  perspective-origin: 100% -100%;
  display: flex;
  flex-flow: column wrap;
  justify-content: center;
  align-items: center;
}
.playground {
  width: 300px;
  margin: 50px auto 50px;
  height: 300px;
  transform-style: preserve-3d;
  transition: all 0.5s;

  &.active {
    transform: skewY(18deg);
  }
}

.target {
  width: 300px;
  height: 300px;
  border-radius: 4px;
  box-sizing: border-box;
  position: absolute;
  transform-style: preserve-3d;
  border: 1px solid var(--target-border-color);
  transition: all 0.5s;
  display: grid;
  grid-template-columns: 2fr 5fr;
  grid-template-rows: 50px 1fr;
  grid-template-areas: 
  'sidebar header'
  'sidebar main';

  &.active {
    transform: translateX(-30px) scaleX(0.85) translateZ(30px);
  }
}
#over.target {
  border: 1px solid transparent;
  z-index: 2;
}
#under.target {
  z-index: 1;
}
#under.target.active {
  transform: translateX(30px) scaleX(0.85) translateZ(-30px);
}

.box_out {
  box-sizing: border-box;
  border: 2px dashed transparent;
  border-radius: 4px;
}

.sidebar {
  grid-area: sidebar;
  border-right-width: 4px;
}

.header {
  grid-area: header;
  border-bottom-width: 4px;
}

.main {
  grid-area: main;
}

.box_inner {
  box-sizing: border-box;
  background-color: var(--box-bg-color);
  border: 2px solid var(--box-border-color);
  border-radius: 4px;
  height: 100%;
  width: 100%;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 1s;
  
  &#active {
    background-color: #f2d662;
    color: #000;
  }
}
.column_line {
  grid-area: sidebar;
  box-sizing: border-box;
  border-right: 2px dashed var(--target-border-color);
}
.row_line {
  grid-column: 1 / -1;
  grid-row: 1;
  box-sizing: border-box;
  border-bottom: 2px dashed var(--target-border-color);
}